package com.hong.service;

import com.spring.BeanPostProcessor;
import com.spring.Component;

// @Component不仅仅代表@Bean的功能 是个组件
@Component
public class HongBeanPostProcessor implements BeanPostProcessor {
    @Override
    public Object postProcessBeforeInitialization(Object bean, String beanName) {
        System.out.println("初始化前");
        return bean;
    }

    @Override
    public Object postProcessAfterInitialization(Object bean, String beanName) {
        System.out.println("初始化后");
        return bean;
    }
}
